//
//  CustomCameraShootPreview.h
//  MinesTime
//
//  Created by imac on 2017/11/8.
//  Copyright © 2017年 MS1968. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, CustomCameraButtonType) {
    CustomCameraButtonTypePop,
//    CustomCameraButtonTypeCancel, //取消图片识别
    CustomCameraButtonTypeAlbum, //相册
    CustomCameraButtonTypeTakePhoto //拍照
};

@protocol CustomCameraShootPreviewDelegate;
@interface CustomCameraShootPreview : UIView
@property (weak, nonatomic) IBOutlet UIView *cameraPreview;

@property (nonatomic, weak) id<CustomCameraShootPreviewDelegate> delegate;
//@property (weak, nonatomic) IBOutlet QMUIButton *cameraButton;


/** 裁剪部分Frame */
@property (nonatomic, assign) CGRect clipRect;
+ (CustomCameraShootPreview *)instanceWithFrame:(CGRect)frame;
//- (instancetype)initWithFrame:(CGRect)frame delegate:(id<CustomCameraShootPreviewDelegate>)delegate;
/** 是否是图片在识别 */
- (void)isImageRecognize:(BOOL)recognize;
/** 正在识别的图片 相册选取 */
//@property (nonatomic, strong) UIImage *albumImage;
@property (weak, nonatomic) IBOutlet UIView *albumMaskView;
@property (weak, nonatomic) IBOutlet UIImageView *albumImageView;
@end
// -----------------------------------------------------
@protocol CustomCameraShootPreviewDelegate <NSObject>
@optional

/**
 相机预览界面按钮点击事件

 @param type 点击类型
 */
- (void)customCameraButtonClickWithType:(CustomCameraButtonType)type;
@end
